<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>过渡案例</title>
    <style>
      .outer {
        position: relative;
        overflow: hidden;
      }

      .outer,
      img {
        width: 400px;
        height: 200px;
      }
      .outer .mask {
        width: 400px;
        height: 200px;
        background-color: black;
        color: #fff;
        position: absolute;
        top: 0;
        left: 0;
        text-align: center;
        line-height: 200px;
        font-size: 100px;
        opacity: 0;
        transition: 1s all linear;
        cursor: pointer;
      }
      .outer img {
        transition: 0.5s all linear;
      }
      .outer:hover .mask {
        opacity: 0.5;
      }
      .outer:hover img {
        transform: scale(1.6) rotate(20deg);
      }
    </style>
  </head>
  <body>
    <div class="outer">
      <img src="../../images/mx.png" alt="" />
      <div class="mask">上海</div>
    </div>
  </body>
</html>
